package com.bnq.control.desktop.popup;

import android.content.Context;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;

import com.bnq.control.R;


public class OperationXmlPopup extends XmlPopup {

	public OperationXmlPopup(Context context) {
		super(context, R.layout.operation);
		// Drawable d =
		// context.getResources().getDrawable(R.color.remotedesktop_optionbar_bg);
		// setBackgroundDrawable(d);
	}

	@Override
	protected void onInitView(View rootView, OnClickListener l) {
		super.onInitView(rootView, l);
		ViewGroup container = (ViewGroup) rootView
				.findViewById(R.id.remote_option_container);

		// 设置所有项的单击事件
		int childCount = container.getChildCount();
		View child;
		for (int i = 0; i < childCount - 1; i++) {
			child = container.getChildAt(i);
			child.setOnClickListener(l);
		}

		child = container.findViewById(R.id.btn_cancel);
		child.setOnClickListener(l);
	}

}